home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Magazin: Amiga-CD 1995 October
/
Amiga-CD 1995 #10.iso
/
weitere_demos
/
adm
/
arexx
/
april
/
search_adm.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-06-04
|
2KB
|
85 lines
/* $VER 0.1 Search_ADM.rexx (5.6.93)
Macro for April-Point-Package.
Made for external menu (fill in there for the command)
%req "%cmd \"sys:rexxc/rx rexx:Search_ADM %string/\\"Type in the lastname\\" >NIL:\" "%#ram:tmp"
The scripts asks for a name or a pattern of a name, type in there
"De Jon*" and it comes back with a requester which types out all
Fido-adresses of the De Jong brothers.
One restriction, the first four letters of the EMail-address in the
ADM-database have to be: Fido. Thats because April is a Fido-package, so
you only get the Fido-addresses of your database.
You can use patterns like in normal Amiga-DOS like "#?" of "*" if you have
a patch tool for that.
Written by Carsten Fulde Fido: 2:245/6804.21 */
OPTIONS RESULTS
parse arg WORT
if ~show(l, "rexxsupport.library") then
if ~addlib("rexxsupport.library", 0, -30, 0) then do
say "Couldn't open rexxsupport.library !" /* open support.lib */
exit 20
end
if ~open('output','ram:tmp','w') then do
say 'Couldn''t open ram:tmp ! '
exit 20
end
fst = 1 /* Anfangsposition = 1 (= erste Adresse) */
found = 0
ADM.LASTNAME = WORT
dummy = writeln('output'," ")
DO FOREVER /* Endlosschleife */
ADDRESS 'ADM.1'
SEARCH fst ADM /* Eintrag suchen */
found = RESULT
IF found >-1 THEN DO /* Rückgabewert = Nummer der gefundenen
Adresse */
GETADDRESS RESAD /* Adresse holen in Stemvariable RESAD */
e1 = upper(RESAD.EMAIL1)
e2 = upper(RESAD.EMAIL2)
IF (pos('FIDO',e1)) | (pos('FIDO',e2))'' THEN DO
IF (pos('FIDO',e1)) THEN
dummy = writeln('output', right(RESAD.EMAIL1,length(e1)-5))
IF (pos('FIDO',e2)) THEN
dummy = writeln('output', right(RESAD.EMAIL2,length(e2)-5))
END /* DO */
fst = found + 1
END /* DO */
ELSE
EXIT 0
END /* IF */
END /* DO */